home *** CD-ROM | disk | FTP | other *** search
- Xref: bloom-picayune.mit.edu comp.os.linux:18316 news.answers:4212
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!mcsun!julienas!corton!geocub!labri.greco-prog.fr!corsini
- From: corsini@labri.greco-prog.fr
- Newsgroups: comp.os.linux,news.answers
- Subject: Linux Frequently Asked Questions 3/4 [monthly posted]
- Summary: Linux, a small and free unix for 386-AT computers.
- Message-ID: <PART3_722647309@geocub.greco-prog.fr>
- Date: 24 Nov 92 23:22:11 GMT
- Expires: Sat, 19 Dec 1992 23:00:00 GMT
- References: <PART2_722647309@geocub.greco-prog.fr>
- Sender: corsini@greco-prog.fr (Marc-Michel CORSINI)
- Reply-To: linux@numero6.greco-prog.fr
- Followup-To: poster
- Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
- Lines: 1104
- Approved: news-answers-request@MIT.Edu
- Supersedes: <PART3_722567366@geocub.greco-prog.fr>
-
- Archive-name: linux-faq/part3
- Last-Modified: 92/11/20
- Version: 1.11
-
- *********************************************************
- * *
- * Answers to Frequently asked questions about Linux *
- * *
- *********************************************************
-
- This post contains Part 3 of the Linux FAQ (4 parts).
- It must be read *after* the 2 first parts.
-
- ===================================8<====>8============================
- CONTENTS (of this part)
-
- VIII. FEATURES (part3)
- IX. GCC MISC INFORMATION (part3)
- X. SCSI SPECIAL (part3)
-
- ===================================8<====>8============================
-
-
-
- VIII. FEATURES
- ==============
-
- QUESTION: I've read that linux has virtual consoles, what must I do to
- get them?
-
- ANSWER: Yes there are, you can access them with the left <alt>-key
- together with <Fn>-key. With the Linux Images distribution, 4 consoles
- are available, getty runs on them.
- Notice that they are NOT accessible when running X (contrary to some
- commercial unices).
-
- QUESTION: When Linux boots, I get the following message "8 virtual
- consoles"; how can I acess to the 5-8 vc's ?
-
- ANSWER: If you want the getty to run on the 5-8, you should add the
- corresponding entries in /etc/inittab. You can also just run sh on
- them by using the doshell soft.
- And then in either case, the ALT-F[5-8] will access the corresponding
- vc.
-
- QUESTION: What kind of shell is /bin/sh ?
-
- ANSWER: It's the Bourne Again Shell, bash-1.12.3 and
- compilation was straightforward, just "make"
- that's all or nearly.
- BTW There does exist different shells for Linux, these are:
- bash, rc, zsh, tcsh and pdksh (a korn shell).
-
-
- QUESTION: Does there exist a man page for **** ?
-
- ANSWER: Download man.tar.Z from your favorite linux ftp site, there is
- most of the fileutils man page -- either **** or g****, example there
- is nothing on ld, but there is for gld :) --, check the whatis
- database provided. The files in the cat1 dir are pre-formatted man
- pages that the man program can use. Quite recently the man pages for
- section 2 have been written (thanks Drew) and can be found, at least
- at tsx-11 in /pub/linux/docs/man/man2.tar.Z
-
- Also manpages are in the SLS on the b? disks.
-
- BTW there is nroff and groff for Linux. Cawf 2.0 works just
- fine for simple man pages, and a partial ms support too.
-
-
- Moreover Michael Johnson is the coordinator for man pages under Linux,
- he is looking for volunteers, so contact the DOC Channel.
-
- QUESTION: Is there a simple man package (groff is too big):
-
- ANSWER: "Cawf -man" also "fm -m" (Al Clark) tsx-11 in
- /pub/linux/binaries/usr.bin/fm.tar.Z
-
-
- QUESTION: What are the editors available in linux?
-
- ANSWER: Right now there are uemacs-3.11, elvis-1.4 (1.5).
- Gnu Emacs is there, read the section devoted to it in the 4th part of
- this FAQ. Also the port of mg (micro gnu) has been done and can be
- found at least at athos.rutgers.edu (128.6.4.4)
- in pub/linux, mg is the binary and mg.tar.Z is the sources file. You
- can also find a PD ed, and elvis has an ex mode. Finnally there are
- joe, vile-3.11, elle (Elle Looks Like Emacs), Xedit and aXe.
-
- QUESTION: Does there exist a printer package for Linux?
-
- ANSWER: (R. Miller) Yes. The "plp" package is currently available
- under the directory [/pub/linux]/BETA/plp on tsx-11 and its mirrors.
- You may also print things manually like so: cat filename > /dev/lp1
- (Note that though "/dev/lp0" exists, most people find that their
- printer is on /dev/lp1. Use whatever the kernel says that it detects
- in the boot-up messages.)
-
-
- QUESTION: How do I make swapping work?
-
- ANSWER: Quite simply, you need the swapon and the mkswap binaries.
- Then you can choose between a swap partition or a swap file.
- The mkswap is used to write the "swap signature", whilst the swapon
- binary is to activate the swapping.
-
- First of all you need a partition :), I assume it's the second of your
- first disk namely /dev/hda2, and it's 10MB big
- A) swap partition:
- you have to indicate it's a swap area, this is done via mkswap
- (instead of mkfs) which needs the name of the partition and the size
- in blocks (a block is 1Ko big); the optional -c flag is for bad block
- checking. So for our example you should perform:
- mkswap [-c] /dev/hda2 10000
- Then you need to indicate that you want linux to use the swap area,
- this is done via swapon. In general it is set in the /etc/rc file,
- just put the following entry:
- /bin/swapon /dev/hda2
- It can also be achieved via the /etc/fstab file
- B) swap file:
- The process is quite close; you need a partition, and a swap file.
- Assume that I prefer a swap area of 4MB (I want to keep some place in
- /dev/hda2). I need first to "dd" the file.
- dd if=/dev/hda2 of=/swap_file bs=1024 count=4096
- bs stands for block size, and count is the number of blocks
- then I have to put the "swap signature" on that file:
- mkswap /swap_file 4096
- At this point, you should 'sync', just to be sure the signature is
- effective. And finally add an entry in the rc file:
- /bin/swapon /swap_file
-
-
- QUESTION: When I boot I get one of the following messages:
- "Unable to find swap signature" or "Bad swap-space bitmap"
-
- ANSWER: You probably forgot to make your swap-device, use the mkswap
- command.
-
-
- QUESTION: How do I know if it is swapping?
-
- ANSWER: You will notice it :)) First of all, Linux tells you at boot
- time, "Adding swap: XXX pages of swap space", and if you start running
- out of memory, you will notice that the disk will work overtime, and
- things slow down. Generally a 2Meg RAM will make the system swap
- constantly while running gcc, 4 Meg will swap occasionnaly when
- optimizing big files (and having other things active, such as make).
- Also, the command 'free' (from the ps package) reports total enabled
- swap space and current swap use.
-
-
- QUESTION: How is it possible to remove a swap file?
-
- ANSWER: Simply perform a rm on that file, and remove the swapon of
- your /etc/rc file.
-
-
- QUESTION: How is it possible to remove a swap device?
-
- ANSWER: mkfs the device, and remove the swapon of your /etc/rc file.
-
- QUESTION: How much swap space do I need ?
-
- ANSWER: Linux does not perform real swapping, it's rather paging (see
- below for a more complete explanation). The swap area is *added* to
- the memory and can be viewed as virtual memory, so choose the size you
- need, example:
-
- 8MB RAM + 6MB swap => 14MB virtual memory
-
- QUESTION: Could someone explain the swap process on Linux?, is it
- swapping or paging ?
-
- ANSWER: (Linus) Linux uses swap as /additional/ memory, one page of
- the swap-space is used for the good-page bitmap and the swapspace
- signature.
- In fact Linux does only paging, no swaping in the meaning "write out
- one whole process to disk".
- The reason it's called swapping is that Linux used paging for memory
- management on a low level since the very beginning, but didn't page to
- disk at all until 0.12.
-
- QUESTION: Is demand paging different from paging and How ?
-
- ANSWER: (Linus) Demand-paging is really "demand loading of
- executables" and is totally independent of the page-swapping
- algorithms, although they have similarities. When Linux strts up a
- process, no actual code space is loaded: I let the page exceptions
- load in the executable as needed. Thus Linux demand-loads the code and
- initialized data it needs.
- Demand-loading has very good points: (a) it simplifies the exec system
- call; (b) it means page sharing between that have excuted the same
- file is easy to implement; (c) it cuts down on the amount of memory
- required. When Linux runs out of real memory, it starts to lock for
- pages it can swap out, but if it notices that the page is clean, it
- just forgets about it, and demand-loads it when it's needed again.
- Thta means that swap-file isn't needed as much, especially when
- running big binaries such as gcc, where the code-pages can be
- demand-loaded as you wish.
-
- Point (c) means that even without any swap space, you can usually run
- slightly larger programs that your memory setup would actually permit.
- I've noticed this while running X and doing a kernel compilation +
- something else wshen I've forgotten to turn on swapping: free reports
- 0 page available but things still work, although performance is
- slightly down...
-
- QUESTION: Is there any way to tell how much swap space you are using
- or have left?
-
- ANSWER: The free program provided with the ps package handles this.
-
-
- QUESTION: I have a 2Megs box, but "free" reports only 1Meg why?
-
- ANSWER: (Linus:) "free" doesn't concern with the memory the kernel has
- allocated for itself. In other words what you see is the *user* memory
- available. The kernel has taken the low 1Meg for it's use (~250Ko for
- it and the rest for buffer cache and kernel data structures); for big
- memory machine it could be even 2Megs.
-
- QUESTION: What tape drives work with Linux ?
-
- ANSWER: (24 sept. P. Riipinen)
- - There is a working QIC-02 device driver for Linux, supporting (at
- least) Everex/Wangtek cards.
- - There are additional patches for the QIC-02 to support Archive
- SC402/499R. You can find them in /pub/linux/alpha/qic-02 at tsx-11
- There are some bugs in the driver but you can backup.
- - Newer drivers are all SCSI, so check the SCSI section in this FAQ.
-
- QUESTION: Is there only the %$#@ keyboard ?
-
- ANSWER: There are Dannish, Finnish, French, German, Uk, US and DVORAK
- keyboards. Set it in the main Makefile of the kernel sources, then
- (re)compile the kernel again. Make sure the files in kernel/chr_drv
- directory are recompiled.
-
-
- QUESTION: (special FINNISH/US) I booteed up with the new image and
- everything work except that some keyboard keys produce wrong
- characters. Does anyone know what is happening?
-
- ANSWER: Since 0.95a images are US product (and so are US-keyboard
- oriented), BUT linux sources are FINNISH product, and so the default
- keyboard is set to be FINNISH. The solution is in the previous Q/A.
-
-
- QUESTION: Does there exist shared libs ?
-
- ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92)
-
- The shared library under Linux started at 0.12. Peter MacDonald
- collaborating with Linus made the first generation of shared library,
- which is the base of the current classic shared library.
-
- The kernel support of shared library under Linux is system call
-
- extern int uselib (const char *__filename);
-
- which loads an executable image with fixed entry point into memory,
- just like the ordinary executables.
-
- In crt0.s, a function which can find out if and which shared images
- are needed and loads them is invoked before `main ()' is called if
- necessary. David Engel and I developed a way to tell the loader which
- shared images have to be loaded, utilizing the similar technique used
- in global constructor in g++ 2.x with the help from GNU binary
- utilities.
-
- In the classic Linux shared library, we build a big executable image
- for several libraries and make sure no external variables outside of
- the participating libraries are referenced. Then we can get the
- absolute addresses of all the global variables defined in the
- libraries used to build that executable image. After that, we make a
- stub library for each participating library which just has the
- absolute addresses of all the global variable in it.
-
- For each shared image, there must be one and only one file, usually
- called, __shared.o, which defines a global variable containing
- version, name and entry point of the shared image, and a dummy global
- data. Among those libraries used to build the shared image, there must
- be one library which will always be referenced whenever any other
- library is referenced. We put `__shared.o' into the stub library for
- that library and add a declaration for the dummy global data defined
- in `__shared.o' which will make sure `__shared.o' will always be linked
- in when any participating libraries are linked.
-
- In gcc 2.2.2d, jump table, developed by David Engel, was introduced in
- the shared library. At the beginning of each shared image, there is
- a table in which every library function has a fixed entry address and
- the instruction at that address is a jump which will lead to the
- real library function. So we can change the library function without
- changing the corresponding entry address of the jump table. For the
- global data we put them at the beginning of data section of the shared
- image. We have to separate them from text code and link them in fixed
- order. It is very hard to maintain the same addresses for the global
- data when library is changed. After the global data are set up properly
- and some spaces are left for possible future changes (that is a very
- tough procedure.), it isn't too difficult to maintain.
-
- In the current implementation, only libc.a, libcurses.a, libdbm.a,
- libtermcap.a and libm.a are built with jump table. The global data in
- X11 libraries are too complicated to make jump table such that their
- addresses won't change when there is a change in X11 libraries. It's
- not apparent yet that the benefits gained from a jump table version of
- the X libraries would offset the effort required to set it up and
- maintain it unless we get some cooperation from X Consortium, which
- is very unlikely. But they are linked with jump table version of
- libc.a and libm.a. That means they don't have to be relinked when
- there is a modification in libc.a or libm.a.
-
-
- QUESTION: Does Linux work for SCSI drives?
-
- ANSWER: Yes since v0.96. At headrest.colorado.edu in /pub/scsi, you
- will find the last SCSI alpha/beta version and also a special SCSI
- FAQ, read it, it contains the latter information than the one provided
- in the SCSI section. You should, also, contact the linux-scsi list or
- directly drew@cs.colorado.edu
-
-
- QUESTION: Linux is supposed to work with ESDI drive. However I have
- trouble with my Magtron MT-4115E (Joincom controler), any clue?
-
- ANSWER: (Linus) Some harddisk don't like linux (even though they
- should). Maybe not a bug but a deficiency.
- (Mika) I had to remove the printk "unexpected hd interrupt" statement
- in hd.c because I was getting so many of those messages. Be warned
- that if there is any read error the system just hangs, even the
- ctrl-alt-del won't work. You should be able to use your ESDI drives if
- you could live with those nuisances.
-
- QUESTION: How does one go about applying a patch to Linux ?
-
- ANSWER: (Drew Eckhardt) In the unix world most of distribution are in
- source form. This includes the operating system. To apply a patch, you
- apply it with the 'patch' program to the affected sources. The patch
- program takes as input the differences between the old and the new
- version. After patching you need to recompile the sources.
-
- Assume I want to apply a patch enclosed in the file XXX. First of all
- I will look at the top of XXX, where the file affected is identified.
- This may have aleading path attached to it. Either cd out to the
- "root" of the patch, ie if I see
- linux/kernel/blk_drv/blk.h
-
- I would cd into /usr/src
- (assuming it's the place where I can find linux/kernel...)
- and then patch as follows
- patch -p0 < whatever_place/XXX
-
- or, you can specify a number of path components to strip from the
- path. If I am in the blk_drv directory patching would be
- patch -p3 < whatever_place/XXX
-
-
- QUESTION: There are a lot of patches available (ps patch, NFS patches,
- CD-ROM patches ...) can I be fairly confident the subsequent patches will
- work?
-
- ANSWER: This is not true yet for the current version; but it will be
- so I kept it :)
- No you can't, patching is a real beta tester art :)). People are not
- working on the same patched release, so you have to check if the
- patches you already applied works on the same kernel part, if not,
- /great/, just apply them. If yes, check if there is an order, patch
- creator knows that, and (should) try to warn patch user (in other
- words: beta tester) otherwise you should edit the patch files (and
- possibly make a brief note to others on this list/newsgroup or even a
- cdiff) before applying them, another solution is to keep cool and wait
- for the next version of Linux where, in general, the modifications
- have been done but this behavior is /not/ Linux helpful.
-
-
- QUESTION: I got the patches on some ftp sites, and applied them to the
- kernel and tried to compile. It didn't !!. Are the patches buggy?
-
- ANSWER: Before remake, just do a make clean in the directories
- involved by the patches. This will force a rebuild of the .o and .a
- files.
- If you have a RCS running on your source tree, did you checked a
- patched version of the files changed before /any/ CO either by you or
- make
-
- Finally, make sure the patches succeded. Normally, failed patches on a
- file FILE will leave a FILE# file. Moreover you will get a "chunk
- failed" message. It is possible to capture the output while patching,
- with the following:
-
- patch -p0 < patchfile | 2>&1 patch.result | more
-
-
- QUESTION: What is VFS?
-
- ANSWER: (Ted) Linux 0.96 already has Virtual FileSystem, which means
- that it acts as a filesystem switch. It makes it easy for someone to
- design another filesystem format and include it in the Linux kernel
- along with the standard minix filesystem format. So it /enables/
- someone to design a robust filesystem which would have some nice
- properties (no 14 chars file name limitation, nor 64Meg limit), and
- could be included in the kernel in such a way that both the Minix and
- the new one could be mounted at the same time. This solves the
- uncompability problem; since the root disk could still use the Minix
- filesystem, while the hardisk could be using the new one.
-
-
-
- QUESTION: What's about Bus Mice ?
-
- ANSWER: (Nathan I. Laredo) Since the Linux v0.96c-pl2 the kernel does
- support LOGITECH and BUS MICE
- If you are unsure that you have a bus mouse or not, check to see if
- your mouse card has a selection for a sample rate switchable between
- 30Hz and 60Hz (or possibly 25/50Hz), if it does not, then it is NOT a
- true bus mouse (InPort mice for example will not work with this
- driver).
- To create a bus mouse device:
- mknod /dev/mouse c 10 0
-
-
- QUESTION: What's about TeX ?
-
- ANSWER: The primary site for Linux TeX is 129.78.66.1, this is
- P. Williams' site in Australia. The stuff at tsx-11 was posted by
- T. Dunbar who does support/maintain the dvilj stuff.
-
-
- QUESTION: What's about LILO ?
-
- ANSWER: (Werner Almesberger)
- LILO - Generic Boot Loader for Linux ("LInux LOader")
-
- This is an ALPHA test release of a new boot loader. Be sure to have
- some means to boot your system from a different media if you install
- LILO on your hard disk.
-
- Features
- --------
-
- - does not depend on the file system. (Tested with Minix, EXT FS and MS-DOS
- FS.)
- - can be used to boot from floppies and from hard disks.
- - can replace the master boot record.
- - can boot non-Linux systems (MS-DOS, DR DOS, OS/2, ...) and unstripped
- kernels.
- - supports up to 16 different boot images that can be selected at boot
- time. Root and swap disk/partition can be set independently for each
- image.
- - boot sector, file map and boot images can be all on different disks or
- partitions.
-
-
- Restrictions and known problems
- -------------------------------
-
- - SCSI disks are not fully supported yet. (Still waiting for some kernel
- changes.)
- - booting other operating systems doesn't seem to work everywhere. If
- everything but booting a non-Linux OS from LILO works on your system,
- you should boot LILO by BOOTACTV and select the alternate OS with the
- latter as a temporary work-around.
- - booting non-Linux systems from the second hard disk ("D:") is not yet
- supported.
-
- Please send all bug reports to almesber@nessie.cs.id.ethz.ch
-
-
- QUESTION: What's about MGR ?
-
- ANSWER: (General Information grabbed from various sources)
- There is a MGR channel available , contact the request adress with
- help in the body: linux-activists-request@niksula.hut.fi
- The stuff can be found at banjo in pub/Linux/MGR
- In brief:
-
- MGR provides:
- - multiple overlapping windows
- - multiple fonts
- - text and graphics in each windows
- - a simple popup menu package
- - a client/server model 'a la' X
- - independance from any peculiar networking technology
-
- MGR consist of a server process and some clients. Each client has his
- own window, and can create subwindows. Clients communicate with the
- server via a bidirectionnal channel. A C library is provided.
-
- When a new window starts, it is as a terminal emulator running the
- shell; for more information you can grab the mgr-man.out from
- bellcore.com
-
-
- QUESTION: I have successfully compiled MGR, but when I try to run the
- program I get "can't find mouse" or "already in use", any clue?
-
- ANSWER: try the following "mgr -m /dev/ttys1" if the mouse is on
- the serial 1. Another possibility is to link /dev/mouse with
- /dev/ttys1 (assuming your mouse is on serial 1). Or if it's a bus
- mouse, "mknod /dev/mouse c 10 0" once.
-
- QUESTION: Any tips for MGR?
-
- ANSWER: Well, I have tried it on my 386Sx Ega/Vga; the screen is Ok
- but the Logitech mouse I have is not well recognized.
-
- BTW check the major/minor number for pty's; they should be character
- device with 4 as major and 128 and bigger as minor:
- ptyp0 c 4 128
- ptyp1 c 4 129
- ...
- ttyp0 c 4 192
- ttyp1 c 4 193
-
- QUESTION: What's about X11 ?
-
- ANSWER: See the section devoted to X11 in this FAQ.
-
-
- IX. GCC MISC INFORMATION
- ========================
-
- The official release of GCC for Linux is 2.2.2d, information for the
- previous versions (1.37, 1.40) can be found in FAQ of July 92.
-
- I think this section is needed, 'cause a) gcc is the compiler under
- Linux, and b) the gcc-2.x is still evolving, and many information change
- constantly.
- To conclude this short introduction (in fact the conclusion will be
- longer than the introduction :), the most recent release of gcc-2.2.2d
- can be found at tsx-11 in /pub/linux/GCC, and also at
- fgb1.fgb.mw.tu-muenchen.de under /pub/linux/GCC, and one of the
- "specialist" is Hongjiu Lu (hlu@eecs.wsu.edu). There is a special
- channel for GCC, feel free to contact the linux-activists list.
- The Information provided in this section which envolved GCC2.xx
- are extracted from the FAQ GCC, written by Hongjiu, provided
- with the current distribution of gcc /READ IT/
- Finally whenever you report a bug please give the version of gcc, the
- version of your kernel, otherwise NO ONE can help you.
-
-
- QUESTION: I don't know how to install gcc stuff, is there special
- places?
-
- ANSWER: gcc-2.xx is splitted in 3 main files 2.xxdb.tar.Z,
- 2.xxlib.tar.Z and 2.xxmisc.tar.Z, some utilities (binutils.tar.Z) and
- shared libraries are also provided. To install them do the following:
-
- First of all, backup the old compiler. YOU MUST BE SURE THERE IS NO
- OTHER C COMPILER INSTALLED ON YOUR SYSTEM. What is meant by compiler
- is all the stuff: binaries, header files, libraries and crt0.o. I
- assume that whateverplace contains the 2.xxfiles you have downloaded.
-
- cd /usr
- tar xvpzf whateverplace/2.xxmisc.tar.Z
-
- read the FAQ, and README in /usr/install/gcc2.
-
-
- QUESTION: What are the contents of them?
-
- ANSWER: 2.xxdb.tar.Z contains cpp, libg.a and libc_p.a. 2.xxlib.tar.Z
- contains cc1 and cc1plus. 2.xxmisc.tar.Z contains gcc 2.xx drivers,
- header files, libraries, manual pages and installation instructions.
- Another file, XXXXinc.tar.Z, where XXXX is the current version number
- of Linux kernel, has all the header files to replace the header files
- from kernel. YOU MUST INSTALL IT. Please read README for details.
-
- (gcc.2.2.2d 08/15/92)
- 1. 2.2.2ddb.tar.Z (libg.a, libc_p.a and jump stable stuffs)
- You just have to install jump/lib*.so.* by hand.
- 3. 2.2.2dg1.tar.Z (libg.a compiled with -g1 to get a smaller libg.a)
- 4. 2.2.2dfix4.tar.Z (<time.h>, <limits.h>, <unistd.h>, libc.a and
- shared/*.a)
- 5. shlib-2.2.2d.tar.Z (build the stub libs for the shared libs.)
- 6. libc-2.2.2dfix4.tar.Z. It has the following files:
-
- ./posix/sysconf.c
-
- You need to delete by hand libinet.a in
- /usr/lib/gcc-lib/i386-linux/2.2.2d
-
-
-
- QUESTION: I seem to be unable to compile anything with gcc. Why?
-
- ANSWER: If you have only 2 MB RAM, gcc will die silently without
- compiling anything. You must have at least 4 MB to do compilations
-
- BTW Since swapping is possible, I have heard that compilation works
- with only 2Meg and a lot disk traffic :) Isn't it great?
-
-
- QUESTION: gcc complains about not finding crt0.o and the system
- include files What am I doing wrong ?
-
- ANSWER: The include files normal place is in /usr/include. lib*.a and
- *.o should be in /usr/lib or /usr/local/lib
-
-
- QUESTION: I tried to port a /new/ version of gnu stuff. But in the
- linking phase, gcc complains about the missing libg.a.
-
-
- ANSWER: Yes this is well known for compiler version earlier than
- 2.2.2, throw away the flag -g that's all, anyway libg.a is /only/ for
- debugging purpose.
-
-
- QUESTION: How to compile programs which may be debugged with gdb?
-
- ANSWER: There are different ways to handle this problem. If
- you have the gcc2.2.2 or later it's simple, use the -g flag. Otherwise
- there are different possibilities:
- 1) As there is no libg.a, you should throw away the -g flag in link
- phase, this means that the compilation must be done in two steps
- example: instead of "gcc -g monprog.c -o monprog", use the following
- "gcc -g -c monprog.c" and then "gcc -o monprog monprog.o"
- Alas this method is not that good if you are using Makefile.
- 2) The other way is to create an empty libg.a as follows (Peter
- Macdonald trick):
- - create libfake.c containing libgfake() {}
- - compile it with: gcc -c libfake.c
- - create the libg.a with: ar r libg.a libfake.o
- 2bis) The more tricky Humberto method:
- cd /usr/lib
- ranlib libg.a
-
- then gcc -g monprog.c -o monprog will produce a debuggable monprog
-
-
- QUESTION: When compiling some code, cc1 complains about some insn
- code, what's that?
-
- ANSWER: An insn is an internal representation that gcc uses when
- compiling. The main part of gcc is to take ordinary c (or c++) code,
- and compile it, while ding optimizations in insn part, which is
- soft/hard independant. Then another part which is hard/Os dependant
- takes the insns and translate it in assembly language. The fix is only
- to turn off the optimization flag (-O).
-
-
- QUESTION: While compiling some stuff, I'm getting the following
- error message:
- Undefined symbol ___addsf3 referenced from text segment
- as well as ___mulsf3 and __cmpsf2.
- These symbols are not in the program or in it's header files.
-
- ANSWER: These are math helper functions, and you can usually compile
- these programs to use the kernel floating point routines by adding
- '-m80387' to the compiler switches. If the program does any wierd
- fp math (exp(), sin()) it'll die when you run it though.
-
-
-
- QUESTION What's about gcc2.x ?
-
- ANSWER: It has been ported to linux, it is (pretty) stable and works.
- The files are 2.xxlib.tar.Z and 2.xxmisc.tar.Z Uncompress and untar
- 2.xxmisc, read the FAQ enclosed and play with it. You can find these
- files at tsx-11 in binaries/compilers/gcc-2.x. One of the most recent
- version is on tsx-11 and fgb1.
- The shlib.tar.Z enables you to create shared libraries, read the
- README file included
- The 096inc.tar.Z contains the header files from the kernel
-
-
- QUESTION: I can't run g++ due to the lack of "expr"; where can I find
- it ?
-
- ANSWER: In the shellutils-1.6.tar.Z (or whatever is the last release)
- on prep.ai.mit.edu
-
- QUESTION: I have grabbed the new gcc2.xx, but I can't use it whenever
- I compile (even hello world program) I get "parse error before ('s";
- any clue ?
-
- ANSWER: Yes, it's caused by bad compress/tar binaries, use the one
- provided at tsx-11 in linux/binaries/usr.bin
-
- QUESTION: Is there a bug in how g++ and gcc handle include files?
- 'cause I can't get them to find files in the g++-include directory.
-
- ANSWER: Did you run "fixfiles"? The file permission in g++-include is
- 640 and should be 444.
-
-
- QUESTION: I've seen on my ftp-server that there are different
- ***fix*.tar.Z files in the GCC directory, do I need them?
-
- ANSWER: If you got a very early copy of gcc 2.2.2, please get
- 2.2.2fix1.tar.Z and 2.2.2fix2.tar.Z, and libc-linux.fix.tar.Z for the
- C lib sources, and new shlib-2.2.2.tar.Z if you want. If you got gcc
- 2.2.2 after you saw **fix*.tar.Z, you are fine.
-
- QUESTION: Is stdio ANSI compatible?
-
- ANSWER: Yes, please test it.
-
- QUESTION: Is g++ in 2.xx?
-
- ANSWER: Yes.
-
- QUESTION: How do I use gcc?
-
- ANSWER: Read manual page, gcc.ps or gcc.man in /usr/install/gcc2.
-
- QUESTION: What options can I use for gcc?
-
- ANSWER: Read manual page, gcc.ps or gcc.man. Also -static tells gcc
- to use the static libraries, -nojump forces gcc to use the classic
- shared libraries. The default is the jump table version of shared
- libraries. The shared libraries for X are linked with the jump table
- version of shared C library.
-
- QUESTION: Where is the source code of the new libc.a?
-
- ANSWER: The same place you find this file. It is called
- lib-src-yy.xx.TZ.
-
- QUESTION: Why does g++ complain, even die?
-
- ANSWER: You need "expr", which is in GNU shell utilities 1.6, echo (?)
- and sed.
-
- QUESTION: How do I generate code for 486?
-
- ANSWER: Add -m486 to CFLAGS.
-
- QUESTION: I heard malloc (0) wouldn't work with Linux, what should I
- do?
-
- ANSWER: include <stdlib.h> and don't define NO_FIX_MALLOC.
-
- QUESTION: Why does gcc say "xxxxx..h not found"?
-
- ANSWER: see QUESTION: What are the contents of them?
-
- QUESTION: I really followed every step in the documentation, but when
- I do "make", why does it say "don't how to make xxxxxx"?
-
- ANSWER: The dependency in Makefile is dated, you need to make a new
- one. Please get some guide on make and read Makefile. For the kernel
- sources, please do
-
- cd src/linux
- make dep
-
- QUESTION: How do I compile programs under Linux?
-
- ANSWER: The Linux C library is trying to be ANSI/POSIX compliant. It
- is also very compatible with SYSV and BSD. The C library is loaded
- with SYSV and BSD functions. There are three exceptions:
-
- 1. signal in Linux is POSIX.
- 2. tty in Linux is POSIX.
- 3. time functions are POSIX, plus a few BSD and SYSV extensions.
- 4. setjmp/longjmp functions are POSIX. But you can use -D__FAVOR_BSD
- to make it BSD or use sigsigjmp/siglongjmp.
-
- When you compile a program under Linux, your best bet is include all
- the appropriate header files and use -Wall. All the usable functions
- and global variables are declared in the corresponding header files.
- YOU SHOULD NOT DEFINE ANY functions or global variables OF THE LINUX C
- LIBRARY IN YOUR CODE IF YOU WANT TO USE THE SHARED LIBRARIES.
-
- After saying all those, you now should know you can compile a program
- with -D_POSIX_SOURCE or -D_GNU_SOURCE (read <features.h> for details).
- With a few modifications you can even use -DSYSV, -DUSG or -DBSD. Some
- codes need to define -DSTDC_HEADERS for ANSI C compiler like gcc here.
-
- To use malloc () and calloc () safely under Linux, please include
-
- <stdlib.h> and don't define NO_FIX_MALLOC.
-
- BTW, gcc -traditional should work with gcc 2.2.2d or above.
-
- Please also read ChangeLog for the latest enhencement.
-
- Please read the header files for details. Maybe you should get a book
- on POSIX. Any suggestion of the book list?
-
- QUESTION: When compiling #$@!, I've got some problems with "SIGBUS"
- signal that doesn't exist. Any clue ?
-
- ANSWER: (Louis J. LaBash, Jr.) SIGBUS is a common problem, its not
- needed, just comment it all out, something like:
-
- #ifdef SIGBUS
- .. normal sigbus code ..
- #endif
-
- QUESTION: How can I write codes suitable for building shared library ?
-
- ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92)
- There are some guidelines for writing codes suitable for building the
- shared library with jump table.
-
- 1. Never, ever allow library users to access global data directly.
- Always, always make them go through access functions. That way,
- you are free to change the internal implementation, but can
- easily provide backward compatibility by simply replacing the
- access functions.
-
- 2. If you do have to define some global data for library users to
- access, put them into a separate file. Never mix them with other
- library code. Also make sure the relative locations of the global
- data will not change very often. One solution is leave some spaces
- for them to grow.
-
- X. SCSI SPECIAL
- ===============
- *** This section is written by Drew Eckhardt, mail him for any
- *** information, questions related to this section.
- *** Last update November 1992.
-
-
- QUESTION: What SCSI hosts are supported?
-
- ANSWER: The Adaptec 154x, Adaptec 174x Future Domain 16x0, Seagate ST0x,
- Ultrastor 14F, and Western Digital 7000FASST are supported. Various Adaptec
- clones from Bustek and Future Domain are known to work, in both ISA and EISA
- flavors.
-
- The TMC 950, and the discrete 8xx implementations will be supported
- in the new Seagate driver when debugging is finished. If you want to
- use an older kernel, add 0x200 to the status and data register addresses.
-
- Not very many BIOS signatures are included for the Future domain boards, so
- they may not auto-detect correctly.
-
- QUESTION: Which disks ?
-
- ANSWER: Anything that works with your host adapter electronically, and
- is new enough to support a December 1985 draft of SCSI-I.
-
- Sysquest, and other removeable hard disks are supported.
-
- Extended partitions also work, with 11 Extended partitions per disk
- allowed in combination with the four real partitions and whole disk
- sub device.
-
- Disks up to two terabytes in size will work, since the sd drier
- switches to 10 byte reads when necessary.
-
- QUESTION: What about SCSI tapes ?
-
- ANSWER: Tapes are supported in the alpha SCSI drivers.
-
- QUESTION: What about CD ROMS?
-
- ANSWER: Stable support is in the kernel for SCSI CD-ROM drives, and the
- ISO-9660 file system is in beta test. Rockridge extensions are supported.
-
- QUESTION: How do I get SCSI information?
-
- ANSWER: Subscribe to the SCSI channel of the linux-activists mailing list.
- mail linux-activists@joker.cs.hut.fi
- And put in the header.
- X-MN-Admin: join SCSI
-
- QUESTION : I can't make a filesystem on /dev/hd*
-
- ANSWER : /dev/hd* aren't your SCSI disks. /dev/sd* are.
- See below for approproate major / minor numbers if they
- do not exist on your root diskette.
-
- QUESTION: How do I partition the disk?
-
- ANSWER: Use pfdisk or the DOS parititioning program of your choice
-
- QUESTION: My partitioning program can't figure out the disk geoemetry
-
- The problem with partitioning SCSI disks and Linux is that Linux talks
- directly to the SCSI interface. Each disk is viewed as the SCSI host
- sees it : N blocks, numbered from 0 to N-1, all error free. There is
- no portable way to get disk geometry.
-
- However, DOS doesn't like things like this, it demmands that BIOS
- present it with a normal Cylinder / Head / Sector coordinates. So,
- BIOS does, and it comes up with some fabrication that fits what DOS
- wants to see. You don't want to disagree with what BIOS thinks when
- you write the partition table.
-
- The newest SCSI code will return the mapped geometry for some host
- adapter / disk combinations. Get the latest SCSI code from
- tsx-11.mit.edu:/pub/linux/ALPHA/scsi
-
- QUESTION: The stock {f,pf}disk programs don't work.
-
- ANSWER: At least some older versions of these partitioning programs have
- /dev/hd* hardcoded into them, and they don't see /dev/sd*.
-
- If you want, YOU can change the /dev/hd* devices to be links to or
- other entries for the SCSI devices.
-
- Also, pfdisk should be callable with a device name.
-
- Hopefully, some one will change the partitioning programs to respect
- the SCSI devices.
-
- QUESTION: Where is the latest version maintained?
-
- ANSWER: tsx-11.mit.edu:/pub/linux/ALPHA/scsi
-
- Join the list before you grab anything.
-
- eric@tantalus.nrl.navy.mil (Eric Youngdale) added scatter/gather support
- to the SCSI drivers, and changed around the internal structures to get
- something that works as "version 2"
-
- QUESTION: What are the major / minor numbers for SCSI drives?
-
- ANSWER: Because of the large number of devices that can be hung off of
- a SCSI bus (as many as 56 if you use SCSI fanouts or bridge boards),
- and the possibility of 16 partitions on a SCSI disk, we'd run out of
- minor numbers if they were statically allocated - so a dynamic
- numbering scheme is used.
-
- Block device major 8 is used for SCSI drives, 9 for SCSI tapes, and
- 11 for CD-ROMs.
-
- Minors are assigned in increments of 16 to SCSI disks as they are
- found, scaning from host 0, ID 0 to host n, ID 7, excluding the host
- ID. Most hosts use ID 7 for themselves.
-
- A minor where minor mod 16 = 0 is the whole drive, where minor mod 16
- is between 1 and 4, that partition, extended partitions dynamically
- assigned from 5 to 15 inclusive. Note that the gendisk.c module
- prints partition tables on initialization - you should be able to see
- them there.
-
- Example : I have four SCSI disks, set up as follows
- Seagate ST02, ID=0
- Seagate ST02, ID = 5
- Ultrastor 14, ID = 0
- Adaptec 1542, ID = 0
-
- The first disk on the seagate at ID 0 will become minors 0-15
- inclusive, the second at ID5 16-31 inclusive, the disk on the
- Ultrastor 32-47, on the Adaptec 48-63.
-
- QUESTION: How do I reduce kernel bloat and eliminate the drivers I
- don't want?
-
- ANSWER: Simply #undef CONFIG_DISTRIBUTION in include/linux/config.h,
- and define the macros for the SCSI hosts you want enabled.
-
- QUESTION: I get SCSI timeouts.
-
- ANSWER: Make sure your board has interrupts enabled correctly.
-
- QUESTION: The seagate driver doesn't work.
-
- ANSWER: There are several possibilities
- 1) Is the board jumpered for IRQ5 ?
-
- The factory settings are
- for MSLOSS, and have interrupts disabled. Interrupts are controlled
- by the W3 (ST01) or JP3 (ST02) jumper, which should have pins FG
- shorted. See your manual.
-
- 2) Cached machines will not have problems IF the Seagate's address
- space (typically C8000 - CAFFFF) is not marked "non cacheable."
- This applies to the i486 internal cache as well as i386/i486
- external caches.
-
- This can be set in the XCMOS of most machines. If you can't disable
- cache for the Seagate's area (16K in size, starting at the base
- address), then you must disable the cache entirely, otherwise
- it won't work.
-
- 3) The new seagate drivers (not yet released) can operate in a mode where
- the 0ws ISA bus line is used to synchronize the ISA and SCSI busses.
- This makes things fast, since the alpha Seagate driver can dump SCSI data out
- fast enough to swamp the bus. However, this will only work if the 0ws
- jumper is enabled. If this isn't the case, the Seagate driver "should" detect
- this as an over/under run condition, but it might not. Either enable
- the 0ws jumper, or #undef FAST in seagate.h.
-
- QUESTION: The Adaptec driver doesn't work.
-
- ANSWER: The Adaptec BIOS does some initialization that affects
- the driver. If the BIOS was disabled, it may fail on your system.
-
- Older versions of the SCSI drivers ran the 174x in 1542 emulation
- mode, where some of these cards have a bug that interferes with
- reads / writes > 512 bytes.
-
- The new SCSI drivers support the 174x in 'native' mode, so this isn't
- a problem.
-
- QUESTION: What about bugs?
-
- ANSWER: It works on MY hardware. It works on Tommy Thorn's Adaptec
- system, Dave Gentzel's Ultrastor, Thomas Wuensche's WD7000, Rick
- Faith's Future Domain, and quite a few other systems.
-
- Bugs that are there will mostly be very hardware specific, and nasty
- to track down. SCSI should be basically error free - consequently,
- the error code has not been heavily tested, and there are known bugs
- in it.
-
- If you have found a bug, please mail it to the mailing list with
- specifics of your hardware. Other people may have the same problem, a
- solution, etc.
-
- If you provide a patch, in context diff form, the bug will be fixed
- Immediately. If you can provide me with a procedure that reproduces
- the bug on *MY* system, the bug will be fixed "soon." Your chances
- of getting it fixed increase exponentially with the amount of
- information provided. If I can't reproduce it, and your
- description gives me no idea as to where in the code to look,
- it won't get fixed by me.
-
- QUESTION: What are the known bugs?
-
- ANSWER :
-
- Many of the drivers cannot abort a command that is in progress - if
- something goes haywire, all drives off that controller will hang.
-
- QUESTION: I get a message saying READ CAPACITY FAILED. What does this
- mean?
-
- ANSWER: UPGRADE.
-
- QUESTION: Why does the system "hang" when SCSI disk access occurs.
-
- ANSWER: Older Linux distributions (pre .97) used earlier versions
- of the SCSI drivers, where the drivers were not interrupt driven
- (easier debugging, or so we thought). Since the drivers did not return
- from the device driver strategy routine, until the SCSI command
- completed, no other tasks were scheduled, and ineteractive performance
- was abysmall.
-
- UPGRADE.
-
- QUESTION: Why can't I swap to a SCSI disk?, Why can't I mount a SCSI
- disk as root?
-
- ANSWER: This was due do a race condition that has since been fixed.
-
- UPGRADE.
-
- QUESTION: What future developments are planned?
-
- ANSWER: The following changes will/have occurred :
-
- - have occurred :
-
- - support for scatter / gather is there. This
- means that all read (and readaheads) will be
- handled via one command.
-
- - Significant changes have been made to the
- Seagate driver. Among other things, it supports the
- 0ws line, which means we can dump data fast enough
- to flood the bus.
-
- - Multiple outstanding commands per LUN are supported.
- This should result in vastly improved performance
- on multi-device systems.
-
- - SCSI tapes are supported.
-
- - Support for LUN !=0 is there.
-
- - Planned
- - SCSI commands are issued as linked commands
- wherever possible, eliminating the arbitration /
- selection / message out phases needed to start
- a command "from scratch".
-
- - I have the mode page specs, and am looking at
- doing "appropriate things" w.r.t. cache enable,
- buffer control, etc. It seems that some drives
- power up, and keep the buffer off until told otherwise
- in software.
-
-
- QUESTION: What drivers does the new code support.
-
- ANSWER: ALL of the existing drivers work fine. However, only an Adaptec
- scatter/gather driver is included in the alpha package. The seagate
- scatter/gather driver is fast but not yet stable and still kernel
- panics.
-
- QUESTION: WHEN?
-
- ANSWER: Again, thanks to Eric's code contributions, it's available in
- alpha test now.
-
-
- ===================8<==========>8================--
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # LaBRI | #
- # 351 cours de la Liberation | e-mail: corsini@labri.greco-prog.fr #
- # 33405 Talence Cedex | #
- # | #
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- --
- There will be some sig, once our local net will be reliable.
- Right now I rather stay anonymous.
-